#ifndef MINIZINCMODEL_H
#define MINIZINCMODEL_H

#include <vector>
#include <string>
#include <map>
#include <set>
#include "enums.h"
#include "minizincvariable.h"
#include "expression.h"
#include "booleanExpression.h"
using namespace std;



// forward declarations.
class SchemaComponentFormula;
//class Expression;
class MiniZincVariable;
/*
	Class: MiniZincConverter
	The proposal of this class is to provide methods to convert a Formula or a SchemaComponentFormula to MiniZinc executable files.
*/

 
class MiniZincModel
{
	/* Section: public*/
	public:
		MiniZincModel(SchemaComponentFormula * formula);
		virtual ~MiniZincModel();

		void toFile(const string & url);
		string toString();

	private:
		set<MiniZincVariable*,set_object> * declarations;
		map<string,Expression*> * table_constraints;
		Expression * constraint;
		set<string> * output;
		map< pair<string,int>,set<pair<string,string> > > * inserts;
		Expression * formatExpression(Expression * expression);
		Expression * createDisjunction(vector<Expression *> * expressions);
		Expression * createConjunction(vector<BooleanExpression *> * expressions);

};

#endif // MINIZINCMODEL_H
